package org.lanqiao.service;

import java.util.List;

import org.lanqiao.bean.EduManager;
import org.lanqiao.bean.EduStuCourseSel;
import org.lanqiao.bean.EduTeacherBean;
import org.lanqiao.bean.EduUserBean;
import org.lanqiao.bean.TeaCourse;
import org.lanqiao.dao.FactoryDao;

public class UserInfoManageService {
	
	public boolean saveResult(EduUserBean eub){
		boolean result=false;
		if(FactoryDao.getUserInfoManagerDao().saveUser(eub)>0){
			result=true;
		}
		return result;
	}
	
	public List getUserList(EduUserBean eub){
		return FactoryDao.getUserInfoManagerDao().returnList(eub);
	}

	public EduUserBean getUserInfoModify(String userid) {
		return FactoryDao.getUserInfoManagerDao().getUserInfoModifyDb(userid);
	}

	/**
	 * 获取查询的结果
	 * @param eub 
	 * @return
	 */
	public List getQueryList(EduUserBean eub) {
		return FactoryDao.getUserInfoManagerDao().doQuery(eub);
	}

	public boolean deleteResult(String strDel) {
		return FactoryDao.getUserInfoManagerDao().deletUserInfo(strDel)>0?true:false;
	}

	public EduUserBean updateStudentInfo(EduUserBean eub) {
		return FactoryDao.getUserInfoManagerDao().updateStudentInf(eub);
	}

	public List getStuCou(String userName) {
		//获取学生选课的表单
		return FactoryDao.getUserInfoManagerDao().getStuC(userName);
	}

	public List getStuCoIn(String userName) {
		return FactoryDao.getUserInfoManagerDao().getStuCoIn(userName);
	}

	public List getStuAllC(String couseId, String stuName) {
		return FactoryDao.getUserInfoManagerDao().getStuAllCInfo(couseId,stuName);
	}

	public EduManager getManagerInfo(EduManager em) {
		// TODO Auto-generated method stub
		return FactoryDao.getUserInfoManagerDao().getManagerInf(em);
	}

	public boolean saveTeaResult(EduTeacherBean etb) {
		// TODO Auto-generated method stub
		return FactoryDao.getUserInfoManagerDao().savaTeacherInfo(etb)>0?true:false;
	}

	public List<EduTeacherBean> getTeacherList(EduTeacherBean etb) {
		// TODO Auto-generated method stub
		return FactoryDao.getUserInfoManagerDao().getTeacherListInfo(etb);
	}

	public List getTeaQueryList(EduTeacherBean etb) {
		// TODO Auto-generated method stub
		return FactoryDao.getUserInfoManagerDao().getTeaQueryListInfo(etb);
	}

	public List getTeaCourse(String userName) {
		return FactoryDao.getUserInfoManagerDao().getTeacherCourse(userName);
	}

	public List getStuCInfo(String userName, String tc) {
		return FactoryDao.getUserInfoManagerDao().getStucInf(userName,tc);
	}

	public boolean updateScore(List scList) {
		return FactoryDao.getUserInfoManagerDao().updateStudentScore(scList)>0?true:false;
	}

	public List getAllCou() {
		return FactoryDao.getUserInfoManagerDao().getAllCourse();
	}

	public List getOtherCou() {
		return FactoryDao.getUserInfoManagerDao().getOtherAllCou();
	}

	public List getAOtherCou(String couId, String couName, String teaId) {
		return FactoryDao.getUserInfoManagerDao().getAotherCourse(couId,couName,teaId);
	}

	public EduTeacherBean getTeacherSelf(EduTeacherBean etb) {
		return FactoryDao.getUserInfoManagerDao().getTeaSelfInfo(etb);
	}

	public List getAllCourse(String couid, String couname) {
		return FactoryDao.getUserInfoManagerDao().insertcourse(couid,couname);
	}

	public List getATC(Integer teacherid) {
		return FactoryDao.getUserInfoManagerDao().getATC(teacherid);
	}

	public void deleteStuCourse(String cousid, String stuName) {
		FactoryDao.getUserInfoManagerDao().deleteStuCourse(cousid,stuName);
	}

	public List getNowTeaCourse(String teaId) {
		return FactoryDao.getUserInfoManagerDao().getNowTeaCourse(teaId);
	}

	public void deleteTeaCouse(String strCid) {
		FactoryDao.getUserInfoManagerDao().deleteTeaCouse(strCid);
	}


}
